<?php

class User extends CI_Model
{
    public function authenticate($username, $password)
    {
    	
    	if($username=="admin" && $password=="adm123")
    		return true;
    	else
    		return false; 
    	
    	/*
        // get salt
        $salt = $this->db->select('salt')->get_where('users', array('email' => $email))->row()->salt;
        if ($salt)
        {
            // hash password with salt and find user
            $hash = sha1($salt.sha1($salt.$password));
            $user = $this->db->select('id')->get_where('users', array(
                'email' => $email,
                'hash' => $hash
            ))->row();
            return $user;
        }

        return false;
        */
    	
    }
}

/* End of file user.php */
/* Location: ./application/models/user.php */